package main

import "strconv"

func updateUinfo(deviceID, pName, loginStatus, loginName, follow, fans string) {
	var pack Pack
	notExists := db.Where("device_id = ?", deviceID).Where("name = ?", pName).First(&pack).RecordNotFound()
	if notExists {
		return
	}

	pack.LoginStatus, _ = strconv.Atoi(loginStatus)
	pack.LoginName = loginName
	pack.Follow = follow
	pack.Fans = fans
	db.Save(&pack)
}
